var express = require('express');
var router = express.Router();
var departService = require('../service/departManage.js')
var memberService = require('../service/memberManage.js')
var reportService = require('../service/reportService.js')
var workService = require('../service/departWorkManage.js')
var standTimeService =require('../service/standardTime.js')
var xinghaoService = require('../service/xinghaoManage.js')
var machineService = require('../service/machineManage.js')

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});
router.post('/allDepartReport',departService.allDepartReports)

router.post('/addMachine',machineService.addMachine)
router.post('/delMachine',machineService.delMachine)
router.post('/editMachine',machineService.editMachine)
router.post('/listMachine',machineService.listMachine)
router.post('/allMachine',machineService.allMachines)

router.post('/addXinghao',xinghaoService.addXinghao)
router.post('/delXinghao',xinghaoService.delXinghao)
router.post('/editXinghao',xinghaoService.editXinghao)
router.post('/listXinghao',xinghaoService.listXinghao)
router.post('/allXinghao',xinghaoService.allXinghaos)

router.post('/addDepart',departService.addDepart)
router.post('/delDepart',departService.delDepart)
router.post('/editDepart',departService.editDepart)
router.post('/listDepart',departService.listDepart)
router.post('/allDepart',departService.allDeparts)

router.post('/addMember',memberService.addMember)
router.post('/delMember',memberService.delMember)
router.post('/editMember',memberService.editMember)
router.post('/listMember',memberService.listMember)
router.post('/allMember',memberService.allMembers)

router.post('/addReport',reportService.addReport)
router.post('/delReport',reportService.delReport)
router.post('/editReport',reportService.editReport)
router.post('/listReport',reportService.listReport)
router.post('/listGroupReport',reportService.listGroupReport)
router.post('/allReport',reportService.allReports)
router.post('/batchAddReport',reportService.batchAdd)

router.post('/addWork',workService.addWork)
router.post('/delWork',workService.delWork)
router.post('/editWork',workService.editWork)
router.post('/listWork',workService.listWork)
router.post('/allWork',workService.allWorks)

router.post('/addStandardTime',standTimeService.addStandardTime)
router.post('/delStandardTime',standTimeService.delStandardTime)
router.post('/editStandardTime',standTimeService.editStandardTime)
router.post('/listStandardTime',standTimeService.listStandardTime)
router.post('/allStandardTime',standTimeService.allStandardTimes)
module.exports = router;
